// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "TickTestActor.generated.h"

class FTickableTest : public FTickableGameObject
{
public:
	virtual void Tick(float DeltaTime);
	virtual TStatId GetStatId() const { RETURN_QUICK_DECLARE_CYCLE_STAT(USceneCapturer, STATGROUP_Tickables); }
	bool bTickable = false;
	virtual bool IsTickable() const { return bTickable; }
	int32 TickableCounter;
};

UENUM()
enum class EMultiOutputExecPin : uint8
{
	_True,
	_False,
};

UCLASS()
class ASYNC_API ATickTestActor : public AActor
{
	GENERATED_BODY()
	
public:	
	// Sets default values for this actor's properties
	ATickTestActor();

protected:
	// Called when the game starts or when spawned
	virtual void BeginPlay() override;

public:	
	// Called every frame
	virtual void Tick(float DeltaTime) override;

	int32 Counter;

	TSharedPtr<FTickableTest> TickableObject;

	FTimerHandle TimerHandle;
	void TimerTick();

	//多输入写法 void MyIf(bool Value, EMultiOutputExecPin Result)
	UFUNCTION(BlueprintCallable, meta = (ExpandEnumAsExecs = "Result"))
	void MyIf(bool Value, EMultiOutputExecPin& Result) {
		Result = Value ? EMultiOutputExecPin::_True : EMultiOutputExecPin::_False;
	}
};
